<template>
  <div>
    <h3>
      <span>商品类型</span>
      <el-button type="primary">添加分类</el-button>
    </h3>
    <hr />
    <el-table :data="arr">
      <el-table-column type="index"></el-table-column>
      <el-table-column label="分类名称" prop="name"></el-table-column>
      <el-table-column label="是否启用">
        <el-switch
          v-model="status"
          active-color="#13ce66"
          inactive-color="#ff4949"
        >
        </el-switch>
      </el-table-column>
      <el-table-column label="操作">
        <el-button>操作</el-button>
        <el-button type="danger">删除</el-button>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: [
        { name: 1, status: true },
        { name: 2, status: true },
        { name: 3, status: false },
        { name: 4, status: true },
        { name: 5, status: false },
      ],
      status: true,
    };
  },
  methods: {},
};
</script>

<style lang="less" scoped>
h3 {
  display: flex;
  align-items: center;
  padding: 20px;
  justify-content: space-between;
}
</style>